<?php

class Render {

  /**
   *
   * @var Render
   */
  protected static $_blocks;

  /**
   * @param string $name
   * @param array $args optional
   */
  public static function renderWidget($name, $args = NULL) {
    $class_name = str_replace('.', '_', $name);
    $widget = new $class_name($args);
    $widget->doRequest();
    echo $widget->render();
  }

  public static function renderBlock($name) {
    
  }

  /**
   *
   * @param mixed $params
   */
  protected static function _setup($params) {
    $db = Db::factory();
  }

  /**
   *
   * @param setting $params
   */
  public static function setup($params) {
    if (self::$_blocks == NULL) {
      $this->_setup($params);
    }
  }

}